#ifndef APOLLO_CLIENT_H
#define APOLLO_CLIENT_H

#include <iostream>
#include <sstream>
#include <json.hpp>

namespace apollo
{
class Response;
class Request;

class ApolloClient
{
    public:
        /*! \enum configSuffix
         *  Detailed 不同的配置文件格式后缀
         */
        enum configSuffix {
            TXT,
            PROPERTIES,
            JSON,
            YAML,
        };

        static std::string getSuffixStr(const configSuffix& suffix) {
            switch (suffix) {
            case PROPERTIES:
                return ".properties";
            case TXT:
                return ".txt";
            case JSON:
                return ".json";
            case YAML:
                return ".yaml";
            default:
                return "";
            }
        }

        /**
         * @brief getProperties
         * @param request
         * @return response
         */
        Response getProperties(const Request &request);

		/**
		 * @brief getJson 
		 * @param request
		 * @return 
		 */
        Response getJson(const Request &request);

		/**
		 * @brief getTxt 
		 * @param request
		 * @return 
		 */
        Response getTxt(const Request &request);

		/**
		 * @brief getYaml 
		 * @param request
		 * @return 
		 */
        Response getYaml(const Request &request);

        /**
         * @brief getConfigFromServer
         * @param request
         * @return response
         */
        Response getConfigFromServer(const Request &request, const configSuffix& suffix);

    public:
        ApolloClient() {}
        ~ApolloClient() {}
};

} // namespace apollo
#endif /* APOLLO_CLIENT_H */
